package com.woniu.userservice.dao;

import com.woniu.userservice.entity.Auctions;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AuctionsDao {
    Auctions queryById(Integer id);

    List<Auctions> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit);
    
    List<Auctions> findAll();

    List<Auctions> queryAll(Auctions auctions);

    int insert(Auctions auctions);

    int update(Auctions auctions);

    int deleteById(Integer id);

    @Select("SELECT COUNT(DISTINCT userId) signuppeople FROM auctions WHERE goodsId=#{goodsid};")
    Integer selectByGoodsid(Integer goodsid);
}